[ANT] Not able to invoke remote script in windows from linux using SSHEXEC

Posted by jpegu on Stack Overflow See other posts from Stack Overflow or by jpegu
Published on 2010-05-18T10:11:17Z Indexed on 2010/05/18 10:20 UTC
Read the original article Hit count: 271

Filed under:

Hi, I have set up OpenSSH in my windows environment and wants to invoke a ANT script from a Linux environment. But i'm getting the following error:

$ ant -f invoke.xml
Buildfile: /home/inysi/jpegu/cdt/tmp/invoke.xml
run:
  [sshexec] Connecting to ******
  [sshexec] cmd : ant -f build.xml
  [sshexec] uname: not found
  [sshexec] basename: not found
  [sshexec] dirname: not found
  [sshexec] Error: JAVA_HOME is not defined correctly.
  [sshexec]   We cannot execute java
  [sshexec] which: not found

BUILD SUCCESSFUL
Total time: 2 seconds

But, i can invoke the remote ANT script in Linux environment using SSHEXEC from windows.

Can you please let me know, what could be the issue. JAVA_HOME is set in the windows environment variables. Where to set JAVA_HOME in the windows environment. Is there something similar to .bash_profile in windows. So that ANT process can pick it up.

© Stack Overflow or respective owner

Related posts about ant